<template>
    <div class="production-manage-template">
        <ProductionDefault v-if="curPath.startsWith('default')" ref="productionDefault"></ProductionDefault>
        <ProductionCreate v-if="curPath.startsWith('create')" ref="productionCreate"></ProductionCreate>
    </div>
</template>

<script>
    import ProductionCreate from "../create/ProductionCreate";
    import ProductionDefault from "../default/ProductionDefault";

    export default {
        name: "ProductionManage",
        components: {ProductionCreate, ProductionDefault},
        data() {
            return {
                curPath: 'default'
            }
        },
        methods: {
            getWorkNo() {
                let number = this.curPath.split('@')[1];
                console.log(number)
            }
        },
        watch: {
            curPath() {
                this.getWorkNo();
            }
        }
    }
</script>

<style lang="scss">
    .production-manage-template {
        background-color: #ffffff;
        width: 100%;
        height: 100%;
    }
</style>